package cn.lyw.controller.controller;

import cn.common.beancopy.util.BeanCopierUtil;
import cn.common.restresult.util.RestResult;
import cn.lyw.service.bo.SmallMiSeckillGoods;
import cn.lyw.service.bo.UserSeckillBO;
import cn.lyw.service.service.SeckillSessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author   lyw
 * @Description 秒杀场次controller
 * @Date 17:08 2021/7/23
 * @Param
 * @return
 */
@RestController
@RequestMapping("/seckillSession")
public class SeckillSessionController {


    @Autowired
    private SeckillSessionService seckillSessionService;


    /**
     * @Author   lyw
     * @Description 秒杀
     * @Date 17:52 2021/7/26
     * @Param
     * @return
     */
    @PostMapping("/seckill")
    public RestResult<SmallMiSeckillGoods> seckill(UserSeckillBO bo){

        return seckillSessionService.seckill(bo);

    }

}
